<script src="<?php echo $baseurl?>public/theme/analytics/datetimepicker/jquery.datetimepicker.js" type="text/javascript" ></script>
<link href="<?php echo $baseurl?>public/theme/analytics/datetimepicker/jquery.datetimepicker.css" type="text/css" rel="stylesheet" /> 


<div class="inside">
  <aside class="navigationPanel" style="margin-top: -28px;padding-top: 20px">
     
     <div class="tree pagesLinks">
        <ul>
           <ul>
              <li> <a href="<?php echo $baseurl.'campaign-user.html'?>" >Chiến dịch của bạn</a> </li>                      
              <li> <a class="active" href="<?php echo $baseurl.'add-campaign-user.html'?>">Tạo chiến dịch mới</a> </li>
           </ul>
        </ul>
     </div>
  </aside>
  <div class="contentPanel" style="height: 542px;">
     <div class="pages" id="profile">
        <div class="profile-edit-form" style="margin-top: -70px;">
              <?php $att = array('id' => '', 'class' => '');echo form_open('', $att);?>
              <div class="contentBox switcher" style="height: 100%;">
                 <h3>Thông tin chiến dịch</h3>
                 <?php if(validation_errors()):?>
                    <h4>
                        <p><?php echo validation_errors(); ?></p>
                    </h4>
                    <?php endif;?>
                 <div class="contentSwitcher hide" style="display: block;">
                    <div class="insideContentBox">
                      
					  <label for="frm-fullname">Địa điểm*:</label> 
						<div class="inputHolder c" style="">
                           <ul style="margin-left: 0;">
							<?php foreach ( $dataListShop AS $el=>$le ){ ?>
								<li style="list-style:none;height: 20px;margin-bottom: 4px;">
                                    <input style="top: -21px;height: 20px;width: 25px;" type="checkbox" name="address_id[]" value="<?php echo $le->id;?>" />
                                    <span style="padding-left: 10px;"><?php echo $le->shopName .' - ' .$le->address ;?></span>
                                </li>
							<?php } ?>
						   </ul>
						</div>
					  
                       <label for="frm-fullname">Tên chiến dịch*:</label> 
                       <div class="inputHolder c">
                          <input type="text" name="title" value="<?php echo $this->input->post('title');?>" class="input-block-level inited blank" autocomplete="off" id="frm-fullname" placeholder="Tên chiến dịch...">
                       </div>
                       
                       <label for="frm-mobile">Thời gian bắt đầu*:</label> 
                       <div class="inputHolder c">
                          <input id="datetimepicker" type="text" name="time_start" value="<?php echo $this->input->post('time_start');?>" class="input-block-level inited blank" placeholder="Thời gian bắt đầu..." />
                       </div>
                       
                       <label for="frm-email">Thời gian kết thúc*:</label> 
                       <div class="inputHolder c">
                          <input id="datetimepicker2" type="text" name="time_end"  value="<?php echo $this->input->post('time_end');?>" class="input-block-level inited blank" placeholder="Thời gian kết thúc..." />
                          <div class="req"></div>
                          <div class="reqBar"></div>
                       </div>
                       
                       <label for="frm-address">Kiểu click quảng cáo*:</label> 
                       <div class="inputHolder c">
							<select name="is_click_unlimit" class="form-select gv-select-option">
                                <option value="1">Không giới hạn</option>
                                <option value="0">Có giới hạn</option>
                            </select>
                       </div>
                       
                        <div class="show-max-clicks" style="display: none;">
                            <label for="frm-fullname">Số lượng click quảng cáo tối đa*:</label> 
                            <div class="inputHolder c">
                                <input type="text" name="max_clicks" value="0" class="input-block-level inited blank" autocomplete="off" id="frm-fullname" placeholder="Số lượng click quảng cáo tối đa..."/>
                            </div>
                        </div>
                       
                        <label for="frm-fullname">Số lượng hiển thị quảng cáo tối đa*:</label> 
                        <div class="inputHolder c">
                            <input type="text" name="max_views" value="<?php echo $this->input->post('max_views');?>" class="input-block-level inited blank" autocomplete="off" id="frm-fullname" placeholder="Số lượng hiển thị quảng cáo tối đa..."/>
                        </div>
                       
                       <label for="frm-fullname">Yêu cầu khác</label> 
                       <div class="inputHolder c">
                          <textarea name="note" rows="4" cols="50" class="input-block-level inited blank" autocomplete="off" id="frm-fullname" placeholder="Yêu cầu khác..."><?php echo $this->input->post('note');?></textarea>
                       </div> 
                        
                       <div class="inputHolder c div_btna">
                          <button type="submit" class="applyBtn btn btn-default btn-small btn-primary">Tạo mới</button>
                          <button type="button" onclick="window.location='<?php echo $baseurl.'campaign-user.html'?>'" class="cancelBtn btn btn-default btn-small">Hủy bỏ</button>
                       </div>
                       
                    </div>
                 </div>
                  
                 
              </div>
              
           </form>
        </div>
     </div>
  </div>
</div> 
<style>
body.flash-permanent .contentPanel {
    padding: 100px 0px 18px !important;
}
.cfr {
    line-height: 1px !important;padding: 15px 79px 0px 12px !important;height: 37px !important;
}
</style>
<script>

$('#datetimepicker').datetimepicker({
dayOfWeekStart : 1,
lang:'vi',
disabledDates:['1986/01/08','1986/01/09','1986/01/10'],
startDate:	'2015/01/01'
});
$('#datetimepicker').datetimepicker({value:'2015/01/01 00:00',step:15});
$('#datetimepicker2').datetimepicker({
dayOfWeekStart : 1,
lang:'vi',
disabledDates:['1986/01/08','1986/01/09','1986/01/10'],
startDate:	'2015/01/01'
});
$('#datetimepicker2').datetimepicker({value:'2015/01/01 00:00',step:15});

</script>
<script>
$('.gv-select-option').change(function(){
    var type = $('.gv-select-option').val();
    if( type == 0 ){
        $('.show-max-clicks').css('display','block');
        //setTimeout(function(){
           // var height = $('.contentBox').height();
          //  $('body').scrollTop(height);
      //  }, 500)
    }else{
        $('.show-max-clicks').css('display','none');
    }
});
</script>